CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
CMAKE_POLICY(VERSION 2.6)
FIND_PACKAGE(Torch REQUIRED)

INCLUDE(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG(-pedantic C_HAS_PEDANTIC)
IF (C_HAS_PEDANTIC)
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic")
ENDIF ()

SET(src init.c)

FILE(GLOB luasrc *.lua)

ADD_TORCH_PACKAGE(salc "${src}" "${luasrc}")

TARGET_LINK_LIBRARIES(salc luaT TH)
